package com.lhy.wcss.web.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.lhy.wcss.common.JsonResponse;
import com.lhy.wcss.service.DictionaryService;
import com.lhy.wcss.model.domain.Dictionary;

import java.util.List;


@Controller
@RequestMapping("/dictionary")
public class DictionaryController {

    private final Logger logger = LoggerFactory.getLogger( DictionaryController.class );

    @Autowired
    private DictionaryService dictionaryService;

    @GetMapping("/getByType")
    @ResponseBody
    public JsonResponse getByType(String type){
        List<Dictionary> list=dictionaryService.getByType(type);
        return JsonResponse.success(list);
    }

}

